home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17916 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.7 KB

  1. Path: news.mindlink.net!news
  2. From: genew@mindlink.bc.ca (Gene Wirchenko)
  3. Newsgroups: rec.games.programmer,comp.programming,comp.lang.c++,alt.msdos.programmer
  4. Subject: Re: Young programmers read me.
  5. Date: Thu, 18 Apr 1996 05:57:47 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4l4ls7$coh@fountain.mindlink.net>
  8. References: <4l0c8p$rvp@fountain.mindlink.net> <4l1n31$636@newsserver.trl.OZ.AU>
  9. NNTP-Posting-Host: line292.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. davej@apertus.com wrote:
  13.  
  14.  
  15. >In article <4l0c8p$rvp@fountain.mindlink.net>, <genew@mindlink.bc.ca> writes:
  16. >> hennebry@plains.nodak.edu (Michael J. Hennebry) wrote:
  17. >> >In article <4kmfqn$e0f@airdmhor.gen.nz>,
  18. >> >Simon Hosie <gumboot@airdmhor.gen.nz> wrote:
  19. >> >>    if(something_happened)
  20. >> >>        do_something_else();
  21. >> 
  22. >> >AAAaaarrrggg! This is an accident waiting to happen.
  23.  
  24. >Agreed.
  25. >>      Why?  If you don't know the language, why program in it?
  26.  
  27. >That's not much of an answer!
  28.  
  29. >> I always indent my code properly (meaning consistently) and if I
  30. >> saw that the then clause needed to be "blockized", I'd do it automatically.  
  31.  
  32. >You may "always indent your code properly" but what about when you are
  33. >working on a large project with 6 or 20 other engineers?   Have you
  34. >ever worked on a project where you share development code with others?
  35. >What if the company you work for has standards that don't allow your
  36. >method?
  37.  
  38.      Yes, I have waded through others' code.  The big problem is that
  39. it is someone else's and not yours i.e. things are not done as you
  40. expect.  Extraneous brackets and such get me wondering if I might have
  41. missed something and thus waste time.
  42.      If the company has different standards?  Well, then I can't use
  43. my standard there, can I?  If it's too much trouble, I'd leave.  Let
  44. me reverse the question.  Suppose the company insists that you do
  45. things my way.  What do you do?
  46.  
  47. >IMO, if you're relying on indentation to indicate program flow, you're
  48. >just asking for trouble, and lots of it.
  49.  
  50.      Why?  Since I rarely use gotos, the indentation does a fine job
  51. of showing the flow.  Did you mean something else?
  52.  
  53. >> >Lotsa luck.
  54. >>      I don't need luck.  I have a method.
  55.  
  56. >What about when you leave the company?   Then every bit of code you
  57. >had ever written or were maintaining would be riddled with accidents
  58. >waiting to happen.   Think ahead, it's not always what we want to do
  59. >as programmers, but code MUST be written in a fashion that it will be
  60. >easily maintainable by junior level programmers.   I don't really like 
  61. >that either, being forced to "code down" but it's a fact that code 
  62. >will have bugs and must be maintained.   Often it's not the sr engineers 
  63. >doing that sort of work.
  64.  
  65.      I follow my standard very strictly.  It is not a complicated one
  66. and it is usable on multiple languages.
  67.      Anything can be screwed up.  (Fools are so ingenious.)  I refuse
  68. to take responsibility for someone else mucking up my code later.  I
  69. do not write obfuscated code and if the maintainer can not read clear
  70. code, he shouldn't be modifying it.  I particularly refuse to take
  71. responsibility for a future supporter so bad that he can't balance
  72. braces.  That's the least of his worries in a real program.
  73.  
  74. >> >or this:
  75. >> >       if(something_happened)
  76. >> >       {   do_something_else(); }
  77. >> 
  78. >>      Extraneous braces cause pause.
  79. >       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  80. >???
  81.  
  82.      It takes time, a bit, but still time, to realize that the braces
  83. are extraneous.  I would hate to have to maintain garbage like the
  84. above and would change it as soon as I could to save myself time and
  85. trouble.
  86.  
  87. >Dave Johnson
  88.  
  89. Sincerely,
  90.  
  91. Gene Wirchenko
  92.  
  93. C Pronunciation Guide:
  94.      y=x++;     "wye equals ex plus plus semicolon"
  95.      x=x++;     "ex equals ex doublecross semicolon"
  96.  
  97.